/**
 * 
 */
package com.aibili.pojo;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * 动态信息
 * 
 * @author qiuch
 * 
 */
@Entity
@Table(name = "t_moment_info")
public class MomentInfo implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 6734740117231616299L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "id", length = 11, nullable = false)
	private long id;

	@OneToOne(cascade = CascadeType.REFRESH, fetch = FetchType.EAGER, targetEntity = UserInfo.class)
	@JoinColumn(name = "user_id", nullable = false, updatable = false)
	private UserInfo user;// 发布用户id

	@Column(name = "content")
	private String content;// 文字消息

	@Column(name = "pics", length = 65535, columnDefinition = "Text")
	private String pics;// 图片地址，“，”分隔

	@Column(name = "pic_num")
	private int pic_num;// 图片数量

	@Column(name = "video")
	private String video;// 视频地址

	@Column(name = "praise_num")
	private int praise_num;// 点赞数
	
	@Column(name = "playnum",columnDefinition = "TINYINT(1) DEFAULT 0")
	private int playnum;//播放数

	@Column(name = "create_time", columnDefinition = "TIMESTAMP default CURRENT_TIMESTAMP")
	private Date create_time;// 发布时间
	
	@Column(name = "status", columnDefinition = "TINYINT(1) DEFAULT 0")
	private Integer status; 
	
	@Column(name = "chioce", columnDefinition = "TINYINT(1) DEFAULT 0")
	private Integer chioce; //0非精选 1精选

	@Column(name = "top_time", columnDefinition = "TIMESTAMP default CURRENT_TIMESTAMP")
	private Date top_time;//置顶时间
	
	@Transient
	private int isclick;// 是否点过赞（0：为点过；1：点过）

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public int getIsclick() {
		return isclick;
	}

	public void setIsclick(int isclick) {
		this.isclick = isclick;
	}

	public int getClick_num() {
		return click_num;
	}

	public void setClick_num(int click_num) {
		this.click_num = click_num;
	}

	@Transient
	private int click_num;// 点赞数

	@Transient
	private int comment_num;// 评论数
	
	@Transient
	private int transpondnum;//转发数
	
	@Transient
	private String share_url;//分享的链接url

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public UserInfo getUser() {
		return user;
	}

	public void setUser(UserInfo user) {
		this.user = user;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getPics() {
		return pics;
	}

	public void setPics(String pics) {
		this.pics = pics;
	}

	public int getPic_num() {
		return pic_num;
	}

	public void setPic_num(int pic_num) {
		this.pic_num = pic_num;
	}

	public String getVideo() {
		return video;
	}

	public void setVideo(String video) {
		this.video = video;
	}

	public int getPraise_num() {
		return praise_num;
	}

	public void setPraise_num(int praise_num) {
		this.praise_num = praise_num;
	}

	public Date getCreate_time() {
		return create_time;
	}

	public void setCreate_time(Date create_time) {
		this.create_time = create_time;
	}

	public int getComment_num() {
		return comment_num;
	}

	public void setComment_num(int comment_num) {
		this.comment_num = comment_num;
	}

	public int getPlaynum() {
		return playnum;
	}

	public void setPlaynum(int playnum) {
		this.playnum = playnum;
	}

	public int getTranspondnum() {
		return transpondnum;
	}

	public void setTranspondnum(int transpondnum) {
		this.transpondnum = transpondnum;
	}

	public String getShare_url() {
		return share_url;
	}

	public void setShare_url(String share_url) {
		this.share_url = share_url;
	}

	public Integer getChioce() {
		return chioce;
	}

	public void setChioce(Integer chioce) {
		this.chioce = chioce;
	}

	public Date getTop_time() {
		return top_time;
	}

	public void setTop_time(Date top_time) {
		this.top_time = top_time;
	}

}
